import request from '../request';
import { ApiPostFunction, LoginParams, LoginResponse, RefreshTokenParams, RefreshTokenResponse } from './types';

export const fetchLogin: ApiPostFunction<LoginParams, LoginResponse> = (data, config) => {
  return request.post('/api/login', data, config);
};

export const fetchRefreshToken: ApiPostFunction<RefreshTokenParams, RefreshTokenResponse> = (data, config) => {
  return request.post('/api/refreshToken', data, config);
};
